home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
netz
/
term
/
extras
/
source
/
term-source.lha
/
termARexxGlobal.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-02-07
|
7KB
|
224 lines
/*
** termARexxGlobal.h
**
** Global data definitions for ARexx interface
**
** Copyright © 1990-1995 by Olaf `Olsen' Barthel
** All Rights Reserved
*/
#include "termGlobal.h"
/* Information table entry types. */
enum { INFO_STEM,INFO_TEXT,INFO_NUMERIC,INFO_BOOLEAN,INFO_MAPPED };
/* Data types to save or open. */
enum { DATATYPE_TRANSLATIONS,DATATYPE_FUNCTIONKEYS,DATATYPE_CURSORKEYS,
DATATYPE_FASTMACROS,DATATYPE_HOTKEYS,DATATYPE_SPEECH,DATATYPE_SOUND,DATATYPE_BUFFER,
DATATYPE_CONFIGURATION,DATATYPE_PHONEBOOK,DATATYPE_SCREENTEXT,
DATATYPE_SCREENIMAGE,DATATYPE_COUNT };
/* Requester types. */
enum { REQUESTER_SERIAL,REQUESTER_MODEM,REQUESTER_SCREEN,
REQUESTER_TERMINAL,REQUESTER_EMULATION,REQUESTER_CLIPBOARD,
REQUESTER_CAPTURE,REQUESTER_COMMANDS,REQUESTER_MISC,
REQUESTER_PATH,REQUESTER_TRANSFER,REQUESTER_TRANSLATIONS,
REQUESTER_FUNCTIONKEYS,REQUESTER_CURSORKEYS,REQUESTER_FASTMACROS,
REQUESTER_HOTKEYS,REQUESTER_SPEECH,REQUESTER_SOUND,REQUESTER_PHONE,
REQUESTER_COUNT };
/* Window types. */
enum { WINDOWID_BUFFER,WINDOWID_REVIEW,WINDOWID_PACKET,WINDOWID_FASTMACROS,
WINDOWID_STATUS,WINDOWID_MAIN,WINDOWID_UPLOAD_QUEUE,WINDOWID_COUNT };
/* The maximum length of an ARexx result variable. */
#define MAX_RESULT_LEN 65536
/* ARexx interface error codes. */
#define TERMERROR_NO_DATA_TO_PROCESS 1000
#define TERMERROR_INDEX_OUT_OF_RANGE 1001
#define TERMERROR_UNKNOWN_OBJECT 1002
#define TERMERROR_RESULT_VARIABLE_REQUIRED 1003
#define TERMERROR_UNIT_NOT_AVAILABLE 1004
#define TERMERROR_DEVICE_DRIVER_STILL_OPEN 1005
#define TERMERROR_CLIPBOARD_ERROR 1006
#define TERMERROR_INFORMATION_IS_READ_ONLY 1007
#define TERMERROR_DATA_TYPES_INCOMPATIBLE 1008
#define TERMERROR_LIST_IS_ALREADY_EMPTY 1009
#define TERMERROR_UNKNOWN_LIST 1010
#define TERMERROR_WRONG_LIST 1011
#define TERMERROR_UNKNOWN_COMMAND 1012
/* An information table entry node. */
struct AttributeEntry
{
WORD Level; /* Node level */
STRPTR Name; /* Name or NULL for numeric value */
UBYTE Type; /* Node type (INFO_TEXT through INFO_MAPPED) */
BYTE ReadOnly; /* If information happens to be read-only */
STRPTR *Mappings; /* Type mappings if applicable */
WORD NodeID; /* Node ID code */
};
/* Argument mutual exclusion information. */
struct ExclusionInfo
{
BYTE A,B;
};
/* A special message and argument packet. */
struct RexxPkt
{
struct Message VanillaMessage;
struct RexxMsg *RexxMsg;
STRPTR *Array;
struct RDArgs *Args;
struct CommandInfo *CommandInfo;
LONG Results[2];
};
/* A special function key pointer. */
typedef STRPTR (* COMMAND)(struct RexxPkt *);
/* Argument inclusion bits. */
#define INCLUDE_00 (1 << 0)
#define INCLUDE_01 (1 << 1)
#define INCLUDE_02 (1 << 2)
#define INCLUDE_03 (1 << 3)
#define INCLUDE_04 (1 << 4)
#define INCLUDE_05 (1 << 5)
#define INCLUDE_06 (1 << 6)
#define INCLUDE_07 (1 << 7)
#define INCLUDE_08 (1 << 8)
#define INCLUDE_09 (1 << 9)
#define INCLUDE_10 (1 << 10)
#define INCLUDE_11 (1 << 11)
/* Rexx command information. */
struct CommandInfo
{
WORD Async;
BYTE Tool;
BYTE Console;
COMMAND Routine;
STRPTR Name,
Arguments;
};
/* termARexx.c */
BYTE __regargs IsNumeric(STRPTR String);
STRPTR __regargs CreateResult(STRPTR ResultString,LONG *Results);
STRPTR __regargs CreateResultLen(STRPTR ResultString,LONG *Results,LONG Len);
BYTE __stdargs CreateVarArgs(STRPTR Value,struct RexxPkt *Packet,STRPTR Stem,...);
STRPTR __regargs CreateVar(STRPTR Value,struct RexxPkt *Packet,STRPTR Name);
STRPTR __regargs CreateMatchBuffer(STRPTR Pattern);
BYTE __regargs MatchBuffer(STRPTR Buffer,STRPTR Name);
VOID __regargs DeleteMatchBuffer(STRPTR Buffer);
WORD __regargs ToMode(STRPTR Name);
WORD __regargs ToList(STRPTR Name);
WORD __regargs ToConfig(STRPTR Name);
WORD __regargs ToRequester(STRPTR Name);
WORD __regargs ToWindow(STRPTR Name);
VOID __regargs RexxPktCleanup(struct RexxPkt *Packet,STRPTR Result);
VOID __saveds RexxServer(VOID);
BYTE HandleRexx(VOID);
/* termARexxAttributes.c */
STRPTR RexxGetAttr(struct RexxPkt *Pkt);
STRPTR RexxSetAttr(struct RexxPkt *Pkt);
/* termARexxCommands.c */
STRPTR RexxActivate(struct RexxPkt *Pkt);
STRPTR RexxAdd(struct RexxPkt *Pkt);
STRPTR RexxBaud(struct RexxPkt *Pkt);
STRPTR RexxBeepScreen(struct RexxPkt *Pkt);
STRPTR RexxCallMenu(struct RexxPkt *Pkt);
STRPTR RexxCapture(struct RexxPkt *Pkt);
STRPTR RexxClear(struct RexxPkt *Pkt);
STRPTR RexxClearScreen(struct RexxPkt *Pkt);
STRPTR RexxClose(struct RexxPkt *Pkt);
STRPTR RexxCloseDevice(struct RexxPkt *Pkt);
STRPTR RexxCloseRequester(struct RexxPkt *Pkt);
STRPTR RexxDeactivate(struct RexxPkt *Pkt);
STRPTR RexxDial(struct RexxPkt *Pkt);
STRPTR RexxDelay(struct RexxPkt *Pkt);
STRPTR RexxDuplex(struct RexxPkt *Pkt);
STRPTR RexxFault(struct RexxPkt *Pkt);
STRPTR RexxGetClip(struct RexxPkt *Pkt);
STRPTR RexxGoOnline(struct RexxPkt *Pkt);
STRPTR RexxHangup(struct RexxPkt *Pkt);
STRPTR RexxHelp(struct RexxPkt *Pkt);
STRPTR RexxOpen(struct RexxPkt *Pkt);
STRPTR RexxOpenDevice(struct RexxPkt *Pkt);
STRPTR RexxOpenRequester(struct RexxPkt *Pkt);
STRPTR RexxParity(struct RexxPkt *Pkt);
STRPTR RexxPasteClip(struct RexxPkt *Pkt);
STRPTR RexxPrint(struct RexxPkt *Pkt);
STRPTR RexxProcessIO(struct RexxPkt *Pkt);
STRPTR RexxProtocol(struct RexxPkt *Pkt);
STRPTR RexxPutClip(struct RexxPkt *Pkt);
STRPTR RexxQuit(struct RexxPkt *Pkt);
STRPTR RexxRead(struct RexxPkt *Pkt);
STRPTR RexxReceiveFile(struct RexxPkt *Pkt);
STRPTR RexxRedial(struct RexxPkt *Pkt);
STRPTR RexxRemove(struct RexxPkt *Pkt);
STRPTR RexxRequestFile(struct RexxPkt *Pkt);
STRPTR RexxRequestNotify(struct RexxPkt *Pkt);
STRPTR RexxRequestNumber(struct RexxPkt *Pkt);
STRPTR RexxRequestResponse(struct RexxPkt *Pkt);
STRPTR RexxRequestString(struct RexxPkt *Pkt);
STRPTR RexxResetScreen(struct RexxPkt *Pkt);
STRPTR RexxResetStyles(struct RexxPkt *Pkt);
STRPTR RexxResetText(struct RexxPkt *Pkt);
STRPTR RexxResetTimer(struct RexxPkt *Pkt);
STRPTR RexxSaveAs(struct RexxPkt *Pkt);
STRPTR RexxSave(struct RexxPkt *Pkt);
STRPTR RexxSelect(struct RexxPkt *Pkt);
STRPTR RexxSend(struct RexxPkt *Pkt);
STRPTR RexxSendBreak(struct RexxPkt *Pkt);
STRPTR RexxSendFile(struct RexxPkt *Pkt);
STRPTR RexxSpeak(struct RexxPkt *Pkt);
STRPTR RexxStopBits(struct RexxPkt *Pkt);
STRPTR RexxTextBuffer(struct RexxPkt *Pkt);
STRPTR RexxTimeout(struct RexxPkt *Pkt);
STRPTR RexxTrap(struct RexxPkt *Pkt);
STRPTR RexxWait(struct RexxPkt *Pkt);
STRPTR RexxWindow(struct RexxPkt *Pkt);
STRPTR RexxRX(struct RexxPkt *Pkt);
STRPTR RexxExecTool(struct RexxPkt *Pkt);
/* termARexxData.c */
extern struct AttributeEntry __far AttributeTable[];
extern LONG AttributeTableSize;
extern UWORD InclusionTable[];
extern struct ExclusionInfo *ExclusionTable[];
extern struct CommandInfo __far CommandTable[];
extern LONG CommandTableSize;
extern struct MsgPort *RexxPort;
extern LONG LastRexxError;
extern LONG RexxTimeoutVal;
extern BYTE UpdateRequired,
TransferUpdateRequired;
extern LONG RexxLaunchCount;
extern struct SignalSemaphore RexxLaunchSemaphore;